package com.woniuxy.portal.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniuxy.comon.RedisConst;
import com.woniuxy.portal.model.entity.BookType;
import com.woniuxy.portal.service.BookTypeService;
import com.woniuxy.portal.mapper.BookTypeMapper;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author liboyang
* @description 针对表【t_booktype】的数据库操作Service实现
* @createDate 2024-10-12 18:02:20
*/
@Service
public class BookTypeServiceImpl extends ServiceImpl<BookTypeMapper, BookType>
    implements BookTypeService {

    @Override
    //使用自定义的缓存生成策略
    @Cacheable(cacheNames = RedisConst.BOOK_TYPE_LIST, keyGenerator = "keyGenerator")
    public List<BookType> findAll() {
        //调用业务层自己的方法
        return this.list();
    }

}




